package com.moyuaninfo.myyserver.framework.base;

import com.moyuaninfo.myyserver.framework.json.JsonResult;
import com.moyuaninfo.myyserver.framework.utils.JsonResultUtils;

/**
 * @author QiuXiangBa
 * @version 1.0
 */
public class BaseController {

    protected <T> JsonResult<T> retSuccess(T data) {
        return JsonResultUtils.success(data);
    }
    protected <T> JsonResult<T> retSuccess(T data, String msg) {
        return JsonResultUtils.success(data, msg);
    }

    protected <T> JsonResult<T> retFail(T data) {
        return JsonResultUtils.fail(data);
    }
    protected <T> JsonResult<T> retFail(T data, String errorMsg) {
        return JsonResultUtils.fail(data, errorMsg);
    }
}
